package com.beidouapp.dao;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;

import com.beidouapp.domain.example.RoleExample;
import com.beidouapp.domain.pojo.Role;

public interface RoleDao extends BaseDao<Role> {

	public List<Role> findRolesByEmpId(Long empId);

	List<Role> findRolesByOrgId(Long orgId);

	Role findRolesByRoleCode(String orgCode);

	Role findRoleByFkId(String fkId);

	public int insert(Role record);

	public int update(Role record);

	public List<Role> findRolesByMap(Map<String, Object> params);

	// ----------------------
	List<Role> findRoleById(Long userId);

	int countByExample(RoleExample example);

	int deleteByExample(RoleExample example);

	int removeEntryByFKID(String fkId);

	public List<Role> findRolesByDepartmentId(String departmentId);

	int insertSelective(Role record);

	List<Role> selectByExample(RoleExample example);

	int updateByExampleSelective(@Param("record") Role record, @Param("example") RoleExample example);

	int updateByExample(@Param("record") Role record, @Param("example") RoleExample example);

	int updateByPrimaryKeySelective(Role record);

	int updateByPrimaryKey(Role record);

	/**
	 * 获取角色信息列表(分页)
	 */
	public List<Role> findPageRoles(Map<String, Object> params, Integer offset, Integer limit);

	public long countPageRoles(Map<String, Object> params);
}
